package com.beta.auth.exception;

import java.io.Serializable;


public class BusinessException extends RuntimeException implements Serializable {

  private static final long serialVersionUID = 8470203602441841251L;

  // 默认错误码是500，防止系统出现未知的异常
  private final int code;

  // 错误信息
  private final String msg;

  public BusinessException(int code, String msg) {
    this.code = code;
    this.msg = msg;
  }

  public int getCode() {
    return code;
  }


  public String getMsg() {
    return msg;
  }

}
